<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <title>基础数据管理-项目信息新增</title>
    <script src="/scripts/boot.js"></script>
</head>
<body class="bg-white">
<div id="addForm">
    <div class="title-info mb-20"><span>基本信息</span></div>
    <table class="table-bg" border="0" cellpadding="1" cellspacing="1" style="width:100%;table-layout:fixed;">
        <colgroup>
            <col width="135px"></col>
            <col width="50%"></col>
            <col width="135px"></col>
            <col width="50%"></col>
        </colgroup>
        <tr>
            <td class="text-titlebg"><span id="dayType"></span></td>
            <td colspan="3">
                <div class="input-div color-66" id="editDate"></div>
                <!--<input name="beginDate"  id="" class="mini-datepicker w200" allowInput="false" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"/>-->
            </td>
            <!--<td class="text-titlebg">结束日期</td>-->
            <!--<td>-->
                <!--<div class="input-div color-66" id="endDate"></div>-->
                <!--<input name="workEndDate"  id="" class="mini-datepicker w200" allowInput="false" errorMode="none" onvalidation="onChoseValidation" required="true" requiredErrorText="请选择"/>-->
            <!--</td>-->
        </tr>
        <tr>
            <td class="text-titlebg noEmpty">备注</td>
            <td colspan="3">
                <div class="textarea-div color-66" id="remark"></div>
                <!--<textarea name="note" class="mini-textarea wtextarea" emptyText=""></textarea>-->
            </td>
        </tr>
    </table>
    <div class="chose-toolbar">
        <a class="chose-button" onclick="CloseWindow('close')">取消</a>
        <a class="chose-button save-button" onclick="typeNew.save()">保存</a>
    </div>
</div>
<div id="mask" class="mask-hidden"></div>
<script type="text/javascript">
	var view = {
        init: function () {
            mini.parse();
        },
        //    数据展示
        SetData: function (data) {
            common.loading("加载中");
            data = mini.clone(data);
            $("#dayType").text(data.type==1?"工作日":"非工作日");
            $.ajax({
                url:"/workCalender/info?id=" + data.id,
                type: "post",
                success: function (text) {
                    //跨页面传递的数据对象，克隆后才可以安全使用
                    var datas = mini.decode(text);   //反序列化成对象
                    $.each(datas,function (key,value) {
                        $("#"+key).html(value);
                        if(key=="editDate"){
                            var date = value.substring(0,10);
                            $("#editDate").html(date);
                        }
                    });
                    common.unmask();
                }
            });
        }
    };
    view.init();
</script>
</body>
</html>